home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1468 / countdwn.frm < prev    next >
Text File  |  1996-07-19  |  3KB  |  110 lines

  1. VERSION 4.00
  2. Begin VB.Form CountDown 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Countdown"
  6.    ClientHeight    =   2970
  7.    ClientLeft      =   6555
  8.    ClientTop       =   4020
  9.    ClientWidth     =   1995
  10.    ControlBox      =   0   'False
  11.    Height          =   3375
  12.    Icon            =   "CountDwn.frx":0000
  13.    Left            =   6495
  14.    LinkTopic       =   "Form1"
  15.    LockControls    =   -1  'True
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   2970
  19.    ScaleWidth      =   1995
  20.    ShowInTaskbar   =   0   'False
  21.    Top             =   3675
  22.    Width           =   2115
  23.    Begin VB.Timer Timer2 
  24.       Enabled         =   0   'False
  25.       Interval        =   1
  26.       Left            =   2940
  27.       Top             =   3780
  28.    End
  29.    Begin VB.Timer Timer1 
  30.       Interval        =   1000
  31.       Left            =   3480
  32.       Top             =   3780
  33.    End
  34.    Begin VB.PictureBox picLCD 
  35.       BorderStyle     =   0  'None
  36.       Height          =   495
  37.       Left            =   1260
  38.       ScaleHeight     =   495
  39.       ScaleWidth      =   555
  40.       TabIndex        =   0
  41.       Top             =   2430
  42.       Width           =   555
  43.    End
  44.    Begin VB.Image Image1 
  45.       Height          =   480
  46.       Left            =   720
  47.       Picture         =   "CountDwn.frx":000C
  48.       Top             =   2340
  49.       Width           =   480
  50.    End
  51.    Begin VB.Image Image2 
  52.       Height          =   480
  53.       Left            =   120
  54.       Picture         =   "CountDwn.frx":044E
  55.       Top             =   2340
  56.       Visible         =   0   'False
  57.       Width           =   480
  58.    End
  59. End
  60. Attribute VB_Name = "CountDown"
  61. Attribute VB_Creatable = False
  62. Attribute VB_Exposed = False
  63. Option Explicit
  64.  
  65. Dim moLCD As New CLCD
  66.  
  67. Private Sub Form_Load()
  68.  
  69.     With moLCD
  70.         .ShowUnlitSegments = True
  71.         .ForeColor = vbBlue
  72.         Set .Container = picLCD
  73.         .Caption = "10"
  74.     End With
  75.     
  76. End Sub
  77.  
  78. Private Sub Form_Unload(Cancel As Integer)
  79.     Set moLCD = Nothing
  80.     Set CountDown = Nothing
  81. End Sub
  82.  
  83. Private Sub Timer1_Timer()
  84. ' Note the Evil Type Coercion.
  85.  
  86.    moLCD.Caption = moLCD.Caption - 1
  87.     
  88.     Select Case moLCD.Caption
  89.         Case 2: Image2.Visible = True
  90.         Case 0: Image2.Visible = False
  91.                 Timer1.Enabled = False
  92.                 Timer2.Enabled = True
  93.     End Select
  94.     
  95.     If moLCD.Caption = 0 Then
  96.         Timer1.Enabled = False
  97.         Timer2.Enabled = True
  98.     End If
  99.  
  100. End Sub
  101.  
  102. Private Sub Timer2_Timer()
  103.     
  104.     With Image1
  105.         .Top = .Top - (Image1.Height * 0.1)
  106.         If .Top < -Image1.Height Then Unload Me
  107.     End With
  108.     
  109. End Sub
  110.